package com.qumitech.visualnovel.datasource.console;

import com.qumitech.visualnovel.model.dao.console.ProfitStatisticDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface ProfitStatisticDOMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ProfitStatisticDO record);

    int insertSelective(ProfitStatisticDO record);

    ProfitStatisticDO selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ProfitStatisticDO record);

    int updateByPrimaryKey(ProfitStatisticDO record);

    List<ProfitStatisticDO> profitStatisticList(@Param("channel") String channel, @Param("startTime") String startTime,
                                                @Param("endTime") String endTime, @Param("offset") int offset,
                                                @Param("limit") int limit, @Param("orderType") String orderType,
                                                @Param("orderBy") String orderBy);
    Integer countProfitStatistic(@Param("channel") String channel,
                                 @Param("startTime") String startTime,
                                 @Param("endTime") String endTime);
    ProfitStatisticDO sumProfitStatistic(@Param("channel") String channel,
                                         @Param("startTime") String startTime,
                                         @Param("endTime") String endTime);
}